<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function fn(x, y) {
        console.log(this, x, y);
      }
      /*
        1.复制函数
        2.绑定参数
      */
      const newFn = fn.bind({ a: 1 }, 100, 200); //绑定
      newFn();
    </script>
  </body>
</html>
